<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="false" %>
<%
	String path = request.getContextPath();
	pageContext.setAttribute("path", path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>bom</title>
<script type="text/javascript">
	// 浏览器自带的对象（bom）可以直接使用
	function testWindow(){
		window.moveTo(300, 200);
		window.resizeTo(400, 400);
		alert("pos:"+ window.screenX);
		// alert("pos:"+ window.screenLeft); // IE
	}

	function testOpenWindow(){
		var oNewWin = window.open("http://www.163.com", "_blank", "height=150,width=300,top=10,left=1,resizable=yes");
		oNewWin.moveTo(300, 200);
	}

	// 所有对象，默认都是在bom的window下
	var d = 88;
	function testVar(){
		alert(window.d);
	}

	function testHistory(){

	}

	//testWindow();
	//testOpenWindow();
	//testVar();
</script>
</head>
<body>
</body>
</html>
